<template>
	<view class="wrap">
		<u-cell-group>
			<u-cell-item title="沙湾自来水公司" @click="CallPhone(shuichang)">{{shuichang}}</u-cell-item>
			<u-cell-item title="沙湾供电所"@click="CallPhone(gongdian)">{{gongdian}}</u-cell-item>
			<u-cell-item title="人民警察"@click="CallPhone(jincha)">{{jingcha}}</u-cell-item>
			<u-cell-item title="消防电话"@click="CallPhone(xiaofang)">{{xiaofang}}</u-cell-item>
			<u-cell-item title="医疗急救"@click="CallPhone(yiliao)">{{yiliao}}</u-cell-item>
		</u-cell-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				shuichang:'020-84731628',
				gongdian:'020-84740003',
				jingcha:'110',
				xiaofang:'119',
				yiliao:'120'
			}
		},
		methods: {
			CallPhone(e) {
				if (e != null) {
					uni.makePhoneCall({
						// 手机号
						phoneNumber: e + '',
						// 成功回调
						success: (res) => {
							console.log('调用成功!')
						},
						// 失败回调
						fail: (res) => {
							console.log(res);
							console.log('调用失败!')
						}

					});
				}
				// uni.makePhoneCall({
				// 	phoneNumber: e
				// });
			},
		}
	}
</script>

<style>

</style>
